<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use Gregwar\Captcha\CaptchaBuilder;
use Session;

class CodeController extends Controller
{
    //code

    public function code($random = 1000)
    {
    	ob_end_clean();
		$builder = new CaptchaBuilder;
		$builder->build(86,34);
		Session::put('code',$builder->getPhrase());
		header('Content-type: image/jpeg');
		$builder->output();
    }
}
